
(defun ELIMINANULS (TAB)
	(IF (NULL TAB) NIL
		(IF (NULL (CAR TAB)) (ELIMINANULS (CDR TAB))
			(CONS (CAR TAB) (ELIMINANULS (CDR TAB)))
		)
	)
)

(defun ELIMINAFILCOLDIAG_TAB (PAR TAB)
	(IF (NULL TAB) NIL
		(CONS (ELIMINAFILCOLDIAG_FILA PAR (CAR TAB)) (ELIMINAFILCOLDIAG_TAB PAR (CDR TAB)))
	)
)

(defun ELIMINAFILCOLDIAG_FILA(PAR FILA)
	(IF (NULL FILA) NIL
		(IF (FILCOLDIAGONAL PAR (CAR FILA)) (ELIMINAFILCOLDIAG_FILA PAR (CDR FILA))
			(CONS (CAR FILA) (ELIMINAFILCOLDIAG_FILA PAR (CDR FILA)))
		)
	)
)

(defun FILCOLDIAGONAL(PAR1 PAR2)
	(OR
		(EQ (CAR PAR1) (CAR PAR2))
		(EQ (CADR PAR1) (CADR PAR2))
		(EQ (- (CAR PAR1) (CADR PAR1)) (- (CAR PAR2) (CADR PAR2)))
		(EQ (+ (CAR PAR1) (CADR PAR1)) (+ (CAR PAR2) (CADR PAR2)))
	)
)

(defun BUSCARLONG2MAS (LIST)
	(IF (NULL LIST) NIL
		(IF (eq (LENGTH (CAR LIST)) 1) (BUSCARLONG2MAS (CDR LIST))
			(CONS (CAR LIST) (BUSCARLONG2MAS (CDR LIST)))
		)
	)
)